package com.ruoyi.charge.service;

import com.ruoyi.charge.auth.entity.req.RegisterReq;
import com.ruoyi.charge.auth.entity.res.AccessTokenResponse;
import com.ruoyi.charge.auth.entity.res.RefreshTokenResponse;
import com.ruoyi.charge.vo.WxUserVo;

public interface IUserService {
    /***
     * 注册
     * @param req
     * @return
     */
    Boolean register(RegisterReq req);

    /**
     * 登录获取token
     * @param phone
     * @param password
     * @return
     */
    AccessTokenResponse getAccessTokenByAccount(String phone, String password);

    /***
     * 刷新token
     * @param userId
     * @param refreshToken
     * @param type
     * @return
     */
    RefreshTokenResponse refreshAccessToken(Long userId, String refreshToken, Integer type);

    /**
     * 微信用户登录
     * @param code
     * @return
     */
    String getWxUserLoginInfo(String code);
}
